<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
<head>
<title><s:property value="#session.titleDesc"/></title>
<%@ include file="/common/meta.jsp"%>
</head>
<body>
<%@ include file="/common/center-top.jsp"%>	
<!-- 网页主显示区，填写表单 -->
<s:form action="/user/role!list.action" name="mainForm" id="mainForm">
	<table class="tableFromBase" align="center" cellpadding="0" cellspacing="1">
		<tr>
			<td class="tdLabel" width="80">姓名</td>
			<td class="tdInput" width="200"><s:textfield name="role.name"></s:textfield></td>
			<td class="tdInput"><img src="${ctp}/images/cx.gif" onclick="mainForm.submit();" style="cursor: pointer;"/></td>
		</tr>
	</table>
</s:form>
<table class="tableList" cellspacing="1" cellspacing="0" cellpadding="0">
	<tr>
		<th>姓名</th>
		<th>状态</th>
		<th>操作</th>
	</tr>
	<s:iterator value="page.result" var="uvar">
		<tr>
			<td>${uvar.name}</td>
			<td>
				<s:if test="%{#uvar.dataStatus == 0}">已启用</s:if><s:else><span style="color:red;">已禁用</span></s:else>
			</td>
			<td>
				<s:if test="%{#uvar.dataStatus == 0}">
					<a href="${ctp}/user/role!modifyRoleStatus.action?role.id=${uvar.id}&role.dataStatus=1">禁用</a>
				</s:if>
				<s:else>
					<a href="${ctp}/user/role!modifyRoleStatus.action?role.id=${uvar.id}&role.dataStatus=0">启用</a>
				</s:else>
				|
				<a href="${ctp}/user/role!toEditRole.action?role.id=${uvar.id}">编辑</a>
				|
				<a href="${ctp}/user/role!roleResource.action?role.id=${uvar.id}">权限管理</a>
			</td>
		</tr>
	</s:iterator>
</table>
<cus:page action="/user/role!list.action" cssClass="scott" paramsKey="role.name"></cus:page>
<%@ include file="/common/center-down.jsp"%>				
</body>
</html>
